<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">

<head>
    <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
    <title>简单的jQuery上传进度条代码</title>
    <link rel="stylesheet" href="./css/progressBar.css" />
</head>
<div id="progressBar"></div>　
<script src="https://code.jquery.com/jquery-3.1.1.min.js"></script>
<script src="lib/layer/layer.js" type="text/javascript"></script>
<script src="js/progressBar.js" type="text/javascript"></script>
<script>
   



var progressBar = new  $.GWT.UI.progressBar.create({
    id:'progressBar',
    status: '进行中...', //状态
    speed: 3, //秒数,默认3s
    layerOpen: false // false|true 是否有弹出窗
})

progressBar.update( 80,'进行中', 3); // value , status ,speed




console.log(Math.random);


   var n = 0, timer = setInterval(function(){
        n = n + Math.random()*10|0;  
        if(n>100){
          n = 100;
          clearInterval(timer);
        }

        console.log( n);

        //进度设置
         progressBar.update( n,'进行中', 3); // value , status ,speed


      }, 300+Math.random()*1000);

</script>
</body>

</html>